There is a technique for performing focus control that repeats a procedure of acquiring image data and computing a contrast value from the acquired image data, while moving the position of a lens, so as to move the lens to a position at which the contrast value peaks. There is another technique for performing focus control that increases the area of an area to be focused on when a peak of the contrast value is not detected in the area to be focused on because high-frequency components are insufficient. There is another technique for performing focus control in which, when a peak of the contrast value is not detected in a first area, a peak of the contrast value is attempted to be detected in a second area with the largest contrast value. There is another technique, in which the position of the main subject being imaged is roughly detected by multipoint distance measurement, and image analysis is performed with respect to the detected position of the main subject, so that the position of the subject being imaged is detected and focus control is performed even when the main subject is present at a position other than the center of a frame.
Examples of the relate-art techniques include Japanese Laid-open Patent Publication No. 3-261277, Japanese Laid-open Patent Publication No. 4-267210, Japanese Laid-open Patent Publication No. 62-182704, and Japanese Laid-open Patent Publication No. 2012-123324.